(function (w) {
    'use strict';
    var addPrivateModal = {
        name:"add-private-modal",
        template:'' +
        '<Modal v-model="insideShow" ok-text="确认添加新房源"  :mask-closable="false" width="1100" class-name="vertical-center-modal addListings-box addListings-box1">'+
        '  <div class="housing-modal-content">'+
        '    <strong class="newHousing">'+
        '      <i-select placeholder="新增民宅" v-model="newHousing">'+
        '        <i-option v-for="item in newHousingM" :value="item.value">{{item.label}}</i-option></i-select>'+
        '    </strong>'+
        '    <ul class="addListings-ul addNewHouseNum">'+
        '      <li>'+
        '        <h2>房源标题</h2>'+
        '        <input type="text" class="listingsTitle" v-model="addObj.title"></li>'+
        '      <li>'+
        '        <h2>行政区域</h2>'+
        '        <strong class="administrative input-share" style="border-right: 1px solid #EAEEEF;">'+
        '          <Cascader v-model="province" :data="data" filterable></Cascader>'+
        '        </strong>'+
        '        <h2>所属片区</h2>'+
        '        <strong class="cell-name input-share">'+
        '          <i-select placeholder="所属片区" v-model="addObj.houseInfo.location">'+
        '            <i-option v-for="item in cell" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '      </li>'+
        '      <li>'+
        '        <h2>详细地址</h2>'+
        '        <input class="detailed-address garden-address" v-model="addObj.houseInfo.address" placeholder="街-详细地址"/></li>'+
        '      <li class="special-li" style="margin-bottom: 0px">'+
        '        <h3>楼栋座</h3>'+
        '        <strong class="specialInput">'+
        '          <input type="text" v-model="addObj.houseInfo.buildingBlock"></strong>'+
        '        <h3>单元</h3>'+
        '        <strong class="specialInput">'+
        '          <input type="text" v-model="addObj.houseInfo.unit"></strong>'+
        '        <h3>总层数</h3>'+
        '        <strong class="specialInput">'+
        '          <input type="text" v-model="addObj.houseInfo.totalLayer"></strong>'+
        '        <h3>楼层数</h3>'+
        '        <strong class="specialInput">'+
        '          <input type="text" v-model="addObj.houseInfo.floor"></strong>'+
        '        <h3>房号</h3>'+
        '        <strong class="specialInput">'+
        '          <input type="text" v-model="addObj.houseInfo.room"></strong>'+
        '      </li>'+
        '      <li class="special-li">'+
        '        <h3 class="special-h">户型</h3>'+
        '        <input type="text" class="special-input" v-model="addObj.doorInfo.room">'+
        '        <em>房</em>'+
        '        <input type="text" class="special-input" v-model="addObj.doorInfo.living">'+
        '        <em>厅</em>'+
        '        <input type="text" class="special-input" v-model="addObj.doorInfo.bathroom">'+
        '        <em>卫</em>'+
        '        <input type="text" class="special-input" v-model="addObj.doorInfo.balcony">'+
        '        <em>阳</em>'+
        '        <h3 class="special-h">朝向</h3>'+
        '        <strong class="orientation">'+
        '          <i-select v-model="addObj.doorInfo.orientation">'+
        '            <i-option v-for="item in orientationM" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '      </li>'+
        '      <li>'+
        '        <h2>建筑面积</h2>'+
        '        <strong class="input-left input-share">'+
        '          <input type="text" v-model="addObj.houseInfo.buildingArea"/></strong>'+
        '        <h2>套内面积</h2>'+
        '        <strong class="input-share">'+
        '          <input type="text" v-model="addObj.doorInfo.roomBuildingArea"/></strong>'+
        '      </li>'+
        '      <li>'+
        '        <h2>物业类型</h2>'+
        '        <strong class="input-left input-share">'+
        '          <input type="text" v-model="addObj.houseInfo.propertyType"/></strong>'+
        '        <h2>物业用途</h2>'+
        '        <strong class="input-share">'+
        '          <input type="text" v-model="addObj.houseInfo.propertyUse"/></strong>'+
        '      </li>'+
        '      <li class="special-li special-li1">'+
        '        <h2>备注</h2>'+
        '        <input type="text" style="width: 79%;" class="special-input"></li>'+
        '      <li class="special-li special-li1">'+
        '        <h3 class="special-h3">房源编号</h3>'+
        '        <strong class="special-strong">自动生成</strong>'+
        '        <h3 class="special-h3">楼盘属性</h3>'+
        '        <strong class="special-strong2 wait" v-if="addObj.isPrivate">私有楼盘</strong>' +
        '        <strong class="special-strong2 open" v-else>公开楼盘</strong>' +
        '        <h3 class="special-h3">发布状态</h3>'+
        '        <strong class="special-strong tijiao">待提交审核</strong></li>'+
        '      <li>'+
        '        <h3 class="special-h3">售价</h3>'+
        '        <input type="text" class="indent10" v-model="addObj.introPrice.price">'+
        '        <h3 class="unit-price">单价：总价/面积</h3>'+
        '        <h3 class="special-h3 package-h3">包税费</h3>'+
        '        <input type="text" class="package indent10" v-model="addObj.introPrice.packageTax"></li>'+
        '      <li>'+
        '        <h3 class="special-h3">底价</h3>'+
        '        <input type="text" class="indent10" v-model="addObj.introPrice.lowPrice">'+
        '        <h3 class="unit-price">单价：总价/面积</h3>'+
        '        <h3 class="special-h3 package-h3">原购价</h3>'+
        '        <input type="text" class="package vindent10" v-model="addObj.introPrice.originalPurchase"></li>'+
        '      <li class="special-li">'+
        '        <h3 class="special-h3">委托时间</h3>'+
        '        <strong class="entrust-time">'+
        '          <Row>'+
        '            <Col span="12">'+
        '              <Date-picker type="date" v-model="addObj.principal.delegateTime" placeholder="选择日期" placement="bottom-end"></Date-picker>'+
        '            </Col>'+
        '          </Row>'+
        '        </strong>'+
        '        <h3 class="special-h3">委托方式</h3>'+
        '        <strong class="commission-mode">'+
        '          <i-select v-model="addObj.principal.commissionMode">'+
        '            <i-option v-for="item in commission" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '        <h3 class="special-h3 administration">管理费</h3>'+
        '        <input type="text" class="package" v-model="addObj.principal.managementFees"></li>'+
        '      <li class="special-li special-li1">'+
        '        <h3 class="special-h3">交付时间</h3>'+
        '        <strong class="entrust-time">'+
        '          <Row>'+
        '            <Col span="12">'+
        '              <Date-picker type="date" v-model="addObj.principal.deliveryTime" placeholder="选择日期" placement="bottom-end"></Date-picker>'+
        '            </Col>'+
        '          </Row>'+
        '        </strong>'+
        '        <h3 class="special-h3">委托编号</h3>'+
        '        <strong class="input-left delegate-number">自动获取</strong>'+
        '        <h3 class="special-h3 administration">来源</h3>'+
        '        <strong class="source" style="width: 21.81%;">'+
        '          <i-select v-model="addObj.principal.source">'+
        '            <i-option v-for="item in sourceM" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '      </li>'+
        '      <li class="special-li special-li1">'+
        '        <h3 class="special-h3">装修等级</h3>'+
        '        <strong class="decoration-grade">'+
        '          <i-select v-model="addObj.decorationInfo.decorationGrade">'+
        '            <i-option v-for="item in decoration" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '        <h3 class="special-h3">装修年限</h3>'+
        '        <strong class="decoration-years">'+
        '          <i-select v-model="addObj.decorationInfo.decorationYears">'+
        '            <i-option v-for="item in years" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '        <h3 class="special-h3 style-h3" style="margin-left: 4px;width: 13.8%;border-left: 1px solid #EAEEEF;">装修风格</h3>'+
        '        <strong class="decoration-style">'+
        '          <i-select v-model="addObj.decorationInfo.decorationStyle">'+
        '            <i-option v-for="item in style" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '      </li>'+
        '      <li>'+
        '        <h3 class="special-h3">产权</h3>'+
        '        <strong class="source payment">'+
        '          <i-select v-model="addObj.housingConditions.propertyRight">'+
        '            <i-option v-for="item in property" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '        <h3 class="special-h3">证件</h3>'+
        '        <strong class="commission-mode">'+
        '          <i-select v-model="addObj.housingConditions.certificates">'+
        '            <i-option v-for="item in certificatesM" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '        <h3 class="special-h3 administration">付款</h3>'+
        '        <strong class="source" style="width: 21.94%;">'+
        '          <i-select v-model="addObj.principal.paymentMethod">'+
        '            <i-option v-for="item in paymentM" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '      </li>'+
        '      <li>'+
        '        <h3 class="special-h3">家电</h3>'+
        '        <strong class="source payment">'+
        '          <i-select v-model="addObj.housingConditions.goods">'+
        '            <i-option v-for="item in electricM" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '        <h3 class="special-h3">家具</h3>'+
        '        <strong class="commission-mode">'+
        '          <i-select v-model="addObj.housingConditions.furniture">'+
        '            <i-option v-for="item in furnitureM" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '        <h3 class="special-h3 administration">付佣</h3>'+
        '        <strong class="source" style="width: 21.94%;">'+
        '          <i-select v-model="addObj.principal.commission">'+
        '            <i-option v-for="item in pay" :value="item.value">{{item.label}}</i-option></i-select>'+
        '        </strong>'+
        '      </li>'+
        '      <div class="h-m-c-btn">'+
        '        <a href="javascript:;" class="locking" @click="handleHouseToPrivate">锁定私盘</a>'+
        '        <button class="cancelHome" @click="close">'+
        '          <i>'+
        '          </i>取消</button>'+
        '        <button class="comfirmHome" @click="handleSaveHouse">'+
        '          <i>'+
        '          </i>确认添加新房源</button>'+
        '      </div>'+
        '    </ul>'+
        '  </div>'+
        '  <!--右边tab切换-->'+
        '  <div class="housing-modal-content-right">'+
        '    <div class="close">'+
        '       <a href="javascript:;" class="clickBig"></a>'+
        '       <a href="javascript:;" class="clickMin"></a>'+
        '    </div>'+
        '    <Tabs value="name1" @on-click="handleTabs" :animated="false">'+
        '      <Tab-pane label="住宅明细" name="name1">' +
        '        <div class="housing-details">' +
        '          <ul>' +
        '            <li v-for="(item,index) in addObj.livingInDetails">'+
        '              <h4>{{addObj.livingInDetails[index].key}}</h4>' +
        '              <input type="text" class="details-input" v-model="addObj.livingInDetails[index].value">' +
        '            </li>'+
        '          </ul>' +
        '        </div>' +
        '      </Tab-pane>' +
        '                    <Tab-pane  label="图片视频" name="name2">' +
        '                        <div class="pictureVideo">' +
        '                            <div class="listings-pictures">' +
        '                                <h5>房源图片</h5>' +
        '                                <div class="demo-upload-list" v-for="item in uploadListA">' +
        '                                    <div v-if="item.status === \'finished\'">' +
        '                                        <img :src="item.url">' +
        '                                        <div class="demo-upload-list-cover">' +
        '                                            <Icon type="ios-trash-outline"' +
        '                                                  @click.native="handleRemoveA(item)"></Icon>' +
        '                                        </div>' +
        '                                    </div>' +
        '                                </div>' +
        '                                <Upload' +
        '                                        ref="uploadA"' +
        '                                        :show-upload-list="false"' +
        '                                        :on-success="handleSuccessA"' +
        '                                        :data="requestData"' +
        '                                        :format="[\'jpg\',\'jpeg\',\'png\']"' +
        '                                        :max-size="2048"' +
        '                                        :on-format-error="handleFormatErrorA"' +
        '                                        :on-exceeded-size="handleMaxSizeA"' +
        '                                        :before-upload="handleBeforeUploadA"' +
        '                                        multiple' +
        '                                        type="drag"' +
        '                                        action="http://up-z2.qiniu.com/"' +
        '                                >' +
        '                                </Upload>' +
        '                                <div class="xuanqu">' +
        '                                    <div class="xuantu">选取图片</div>' +
        '                                    <div class="picture-name"></div>' +
        '                                    <div class="upload">上传</div>' +
        '                                </div>' +
        '                            </div>' +
        '                            <div class="listings-pictures">' +
        '                                <h5>360全景图片</h5>' +
        '                                <div class="demo-upload-list" v-for="item in uploadListB">' +
        '                                    <div v-if="item.status === \'finished\'">' +
        '                                        <img :src="item.url">' +
        '                                        <div class="demo-upload-list-cover">' +
        '                                            <Icon type="ios-trash-outline"' +
        '                                                  @click.native="handleRemoveB(item)"></Icon>' +
        '                                        </div>' +
        '                                    </div>' +
        '                                </div>' +
        '                                <Upload' +
        '                                        ref="uploadB"' +
        '                                        :data="requestData"' +
        '                                        :show-upload-list="false"' +
        '                                        :on-success="handleSuccessB"' +
        '                                        :format="[\'jpg\',\'jpeg\',\'png\']"' +
        '                                        :max-size="2048"' +
        '                                        :on-format-error="handleFormatErrorB"' +
        '                                        :on-exceeded-size="handleMaxSizeB"' +
        '                                        :before-upload="handleBeforeUploadB"' +
        '                                        multiple' +
        '                                        type="drag"' +
        '                                        action="http://up-z2.qiniu.com/"' +
        '                                >' +
        '                                </Upload>' +
        '                                <div class="xuanqu">' +
        '                                    <div class="xuantu">选取图片</div>' +
        '                                    <div class="picture-name"></div>' +
        '                                    <div class="upload">上传</div>' +
        '                                </div>' +
        '                            </div>' +
        '                            <div class="listings-pictures">' +
        '                                <h5>45秒短视频合成</h5>' +
        '                                <div class="demo-upload-list" v-for="item in uploadListC">' +
        '                                    <div v-if="item.status === \'finished\'">' +
        '                                        <img :src="item.url">' +
        '                                        <div class="demo-upload-list-cover">' +
        '                                            <Icon type="ios-trash-outline"' +
        '                                                  @click.native="handleRemoveC(item)"></Icon>' +
        '                                        </div>' +
        '                                    </div>' +
        '                                </div>' +
        '                                <Upload' +
        '                                        ref="uploadC"' +
        '                                        :data="requestData"' +
        '                                        :show-upload-list="false"' +
        '                                        :on-success="handleSuccessC"' +
        '                                        :format="[\'jpg\',\'jpeg\',\'png\']"' +
        '                                        :max-size="2048"' +
        '                                        :on-format-error="handleFormatErrorC"' +
        '                                        :on-exceeded-size="handleMaxSizeC"' +
        '                                        :before-upload="handleBeforeUploadC"' +
        '                                        multiple' +
        '                                        type="drag"' +
        '                                        action="http://up-z2.qiniu.com/"' +
        '                                >' +
        '                                </Upload>' +
        '                                <div class="xuanqu">' +
        '                                    <div class="xuantu">选取图片</div>' +
        '                                    <div class="picture-name"></div>' +
        '                                    <div class="upload">上传</div>' +
        '                                </div>' +
        '                            </div>' +
        '                        </div>' +
        '                    </Tab-pane>' +
        '      <Tab-pane label="业主信息" name="name3">' +
        '        <div class="owner-information">' +
        '          <div class="owner-information-top">' +
        '            <h5>业主信息</h5>' +
        '            <div class="information-box">' +
        '              <span class="head-portrait">' +
        '                <img src="../images/head-portrait.png" alt=""></span>' +
        '              <!--&lt;!&ndash;左边&ndash;&gt;-->' +
        '              <div class="information-box-left">' +
        '                <div class="list-information">' +
        '                  <h4 class="spacing-h4 spacingName">姓名:</h4>' +
        '                  <input type="text" class="name-input" v-on:click="dropDown" v-model="addObj.ownerInformation.name"/>' +
        '                  <div class="xuanz"></div>' +
        '                </div>' +
        '                <div class="list-information">' +
        '                  <h4>房产证 ：</h4>' +
        '                  <strong class="house-property">' +
        '                    <i-select v-model="addObj.ownerInformation.propertyOwnershipCertificate">' +
        '                      <i-option v-for="item in house" :value="item.value">{{item.label}}</i-option></i-select>' +
        '                  </strong>' +
        '                </div>' +
        '                <div class="list-information">' +
        '                  <h4 class="mobile-phone">手机：</h4>' +
        '                  <p>' +
        '                    <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.mainPhone"/>' +
        '                    <em class="add-to" style="display: inline" v-show="addObj.ownerInformation.mainPhone" @click="addPhone(0,0)"></em>' +
        '                  </p>' +
        '                  <div class="addPhone" v-for="(item,index) in addObj.ownerInformation.otherPhone">'+
        '                  <h4 class="mobile-phone">手机：</h4>' +
        '                  <p class="addPhoneBtm">' +
        '                    <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.otherPhone[index]"/>' +
        '                    <em class="del-to" style="display: inline" @click="delPhone(index,0,0)"></em>' +
        '                  </p>' +
        '                   </div>'+
        '                </div>' +
        '                <div class="list-information">' +
        '                  <h4 class="wechat">微信：</h4>' +
        '                  <p>' +
        '                    <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.WeChat"></p>' +
        '                </div>' +
        '              </div>' +
        '              <!-- &lt;!&ndash;右边&ndash;&gt;-->' +
        '              <div class="information-box-right">' +
        '                <div class="list-information" style="margin: 0 0 8px 0;">' +
        '                  <h4 class="left-h4 spacing-h4 spacingName">关系:</h4>' +
        '                  <h4>本人</h4></div>' +
        '                <div class="list-information">' +
        '                  <h4 class="left-h4 spacing-h4 spacingName" style="margin-top: 2px;">国籍:</h4>' +
        '                  <strong class="nationality">' +
        '                    <i-select v-model="addObj.ownerInformation.nationality">' +
        '                      <i-option v-for="item in nationalityM" :value="item.value">{{item.label}}</i-option></i-select>' +
        '                  </strong>' +
        '                </div>' +
        '                <div class="list-information">' +
        '                  <h4 class="left-h4 landline">座机：</h4>' +
        '                  <p>' +
        '                    <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.landline"/></p>' +
        '                </div>' +
        '                <div class="list-information">' +
        '                  <h4 class="left-h4 qq-h4">Q Q：</h4>' +
        '                  <p>' +
        '                    <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.QQ"/></p>' +
        '                </div>' +
        '              </div>' +
        '            </div>' +
        '          </div>' +
        '          <div class="owner-information-bottom">' +
        '            <h5>其他人联系信息</h5>' +
        '            <i-Form  :model="addObj.ownerInformation">' +
        '              <Form-item v-for="(item, index) in addObj.ownerInformation.otherContacts">' +
        '                <div class="information-box information-box1">' +
        '                  <span class="head-portrait">' +
        '                    <img src="../images/head-portrait.png" alt=""></span>' +
        '                  <!--&lt;!&ndash;左边&ndash;&gt;-->' +
        '                  <div class="information-box-left">' +
        '                    <div class="list-information">' +
        '                      <h4 class="spacing-h4 spacingName">姓名:</h4>' +
        '                      <input type="text" class="name-input" v-on:click="dropDown" v-model="addObj.ownerInformation.otherContacts[index].name"/>' +
        '                      <div class="xuanz"></div>' +
        '                    </div>' +
        '                <div class="list-information">' +
        '                  <h4 class="mobile-phone">手机：</h4>' +
        '                  <p>' +
        '                    <input type="text" class="cell-phone-number" v-model="item.mainPhone"/>' +
        '                    <em class="add-to" style="display: inline" v-show="item.mainPhone" @click="addPhone(index,1)"></em>' +
        '                  </p>' +
        '                  <div v-for="(nodeItem,nodeIndex) in item.otherPhone">'+
        '                  <h4 class="mobile-phone">手机：</h4>' +
        '                  <p>' +
        '                    <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.otherPhone[index]"/>' +
        '                    <em class="del-to" style="display: inline" @click="delPhone(index,nodeIndex,1)"></em>' +
        '                  </p>' +
        '                   </div>'+
        '                </div>' +
        '                    <div class="list-information">' +
        '                      <h4 class="wechat">微信：</h4>' +
        '                      <p>' +
        '                        <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.otherContacts[index].WeChat"/>' +
        '                       </p>' +
        '                    </div>' +
        '                  </div>' +
        '                  <!--&lt;!&ndash;右边&ndash;&gt;-->' +
        '                  <div class="information-box-right">' +
        '                    <div class="list-information">' +
        '                      <h4 class="left-h4 spacing-h4 spacingName ">关系:</h4>' +
        '                      <strong class="relationship">' +
        '                        <i-select v-model="addObj.ownerInformation.otherContacts[index].relationship">' +
        '                          <i-option v-for="item in relationshipM" :value="item.value">{{item.label}}</i-option></i-select>' +
        '                      </strong>' +
        '                    </div>' +
        '                    <div class="list-information">' +
        '                      <h4 class="left-h4 landline">座机：</h4>' +
        '                      <p>' +
        '                        <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.otherContacts[index].landline"/></p>' +
        '                    </div>' +
        '                    <div class="list-information">' +
        '                      <h4 class="left-h4 qq-h4">Q Q：</h4>' +
        '                      <p>' +
        '                        <input type="text" class="cell-phone-number" v-model="addObj.ownerInformation.otherContacts[index].QQ"/></p>' +
        '                    </div>' +
        '                  </div>' +
        '                  <Button type="ghost" class="shanchu" @click="handleRemove(index)"></Button>' +
        '                </div>' +
        '              </Form-item>' +
        '            </i-Form>' +
        '          </div>' +
        '        </div>' +
        '        <div class="addBtnBox">' +
        '        <button @click="handleAdd" class="ownerAddBtn"></button>' +
        '        </div>' +
        '      </Tab-pane>' +
        '      <Tab-pane label="房源地图" name="name4">'+
        '        <!--地图导入开始-->'+
        '        <div class="map_api">'+
        '          <div :id="amapDomId" style="height:100%"></div>'+
        '        </div>'+
        '  <div class="retrieval_button">' +
        '    <div class="school_button" @click="showSchoolMarker(0)">' +
        '      <div class="school_img"></div>' +
        '      <strong>学校</strong></div>' +
        '    <div class="hospital_button" @click="showSchoolMarker(1)">' +
        '      <div class="hospital_img"></div>' +
        '      <strong>医院</strong></div>' +
        '    <div class="Supermarket_button" @click="showSchoolMarker(2)">' +
        '      <div class="Supermarket_img"></div>' +
        '      <strong>超市</strong></div>' +
        '    <div class="Market_button" @click="showSchoolMarker(3)">' +
        '      <div class="Market_img"></div>' +
        '      <strong>商场</strong></div>' +
        '    <div class="Busstop_button" @click="showSchoolMarker(4)">' +
        '      <div class="Busstop_img"></div>' +
        '      <strong>公交站</strong></div>' +
        '  </div>' +
        '  <div id="r-result">' +
        '    <div class="r-result_img"></div>' +
        '    <input type="button" @click="handleEditMarker" :value="editPoint" /></div>' +
        '  <div id="control">' +
        '    <div class="control_img"></div>' +
        '    <button @click="handleEditMapRange">{{editHouseText}}</button></div>' +
        '      </Tab-pane>'+
        '    </Tabs>'+
        '  </div>'+
        '</Modal>',
        model: {
            prop: 'isShowModal',
            event: 'change-show'
        },
        props: {
            isShowModal: {
                type: Boolean,
                default: false
            },
            amapDomId:{
                type: String
            }
        },
        watch: {
            isShowModal: function (val) {
                this.$data.insideShow = val
            },
            insideShow: function (val) {
                this.$emit('change-show', val)
            }
        },
        data: function () {
            return {
                editPoint:'修改坐标点',
                editHouseText:'编辑房源范围',
                requestData: {
                    token: ''
                },
                amap:{},
                isPublicHouse: true,
                insideShow : this.isShowModal,
                addObj:{
                    decorationInfo: {
                        decorationGrade: '',
                        decorationYears: '',
                        decorationStyle: ''
                    },
                    publicStatus:0,
                    id: 82481,
                    doorInfo: {
                        room: '',
                        living: '',
                        bathroom: '',
                        balcony: '',
                        orientation: '',
                        roomBuildingArea: ''
                    },
                    remark: '',
                    isPrivate: true,
                    status: 0,
                    introPrice: {
                        price: '',
                        packageTax: '',
                        lowPrice: '',
                        originalPurchase: ''
                    },
                    principal: {
                        delegateTime: '',
                        commissionMode: '',
                        managementFees: '',
                        delegateNumber: '',
                        source: '',
                        deliveryTime: '',
                        paymentMethod: '',
                        commission: ''
                    },
                    livingInDetails: [
                        {
                            key: '显示字段',
                            value: '显示字段',
                            show: false
                        },
                        {
                            key: '自定义字段',
                            value: '自定义字段',
                            show: true
                        }
                    ],
                    houseInfo: {
                        unit: '',
                        province: '',
                        area: '',
                        location: '',
                        address: '',
                        buildingBlock: '',
                        city: '',
                        totalLayer: '',
                        floor: '',
                        room: '',
                        buildingArea: '',
                        propertyType: '',
                        propertyUse: ''
                    },
                    housingConditions: {
                        propertyRight: '',
                        certificates: '',
                        goods: '',
                        furniture: ''
                    },
                    seeRecord: [
                        {
                            seeTime: '',
                            seeCustomer: '',
                            seePeople: '',
                            purchaseIntention: '',
                            status: 0
                        }
                    ],
                    closingRecord: [
                        {
                            closingTime: '',
                            closingCustomer: '',
                            salesperson: '',
                            acreage: '',
                            transactionPrice: ''
                        }
                    ],
                    enterInfo: {
                        name: '',
                        enterTime: ''
                    },
                    title: '',
                    ownerInformation: {
                        name: '',
                        mainPhone: '',
                        otherPhone: [],
                        relationship: '',
                        WeChat: '',
                        QQ: '',
                        landline: '',
                        otherContacts: [
                            {
                                name: '',
                                relationship: '',
                                landline: '',
                                WeChat: '',
                                QQ: '',
                                mainPhone: '',
                                otherPhone: []
                            }
                        ],
                        propertyOwnershipCertificate: '',
                        nationality: ''
                    },
                    mediaInfo: {
                        imgList:[],
                        panorama:[],
                        videoInfo:[]
                    },
                    mapInfo: {
                        path:[],
                        place:[]
                    },
                    employerReturnVisitInfo: {
                        status: 94506,
                        visitingPerson: '',
                        revisitDays: '',
                        returnVisitType: '',
                        contentText: '',
                        imgList: '',
                        seeStatus: 60302,
                        intentionState: 69989
                    }
                },
                /*新增筛选*/
                newHousing: "",
                newHousingM: [

                    {label: "新增住宅", value: "新增住宅"},
                    {label: "新增民宅", value: "新增民宅"},
                    {label: "新增厂房", value: "新增厂房"},
                    {label: "新增土地", value: "新增土地"},
                ],
                /*默认排序*/
                sort: [
                    {
                        value: 'morenpaixuy',
                        label: '默认排序1',
                    },
                    {
                        value: 'morenpaixue',
                        label: '默认排序2'
                    },
                    {
                        value: 'morenpaixus',
                        label: '默认排序3'
                    }
                ],
                defaultSort: '',
                /*行政区域*/
                /*省份城市选择*/
                data: [
                    {
                        value: '海口市',
                        label: '海口市',
                        children: [
                            {
                                value: '美兰区',
                                label: '美兰区',
                            },{
                                value: '龙华区',
                                label: '龙华区',
                            }
                            ,{
                                value: '琼山区',
                                label: '琼山区',
                            }
                        ]
                    },
                    {
                        value: '三亚市',
                        label: '三亚市',
                        children: [
                            {
                                value: '天涯区',
                                label: '天涯区',
                            }
                        ],
                    },
                    /*默认排序*/

                ],
                province: [],
                /*所属片区*/
                cellName: "",
                cell: [
                    {label: "片区1", value: "片区1"},
                    {label: "片区2", value: "片区2"},
                ],


                /*朝向*/
                orientation: "nomal",
                orientationM: [
                    {label: "朝南", value: "strong"},
                    {label: "朝北", value: "normal"},
                ],

                /*委托方式*/
                commissionMode: "nomal",
                commission: [
                    {label: "委托方式", value: "strong"},
                    {label: "委托方式", value: "normal"},
                ],
                /*来源*/
                source: "nomal",
                sourceM: [
                    {label: "来源", value: "strong"},
                    {label: "来源2", value: "normal"},
                ],

                /*装修等级*/
                decorationGrade: "nomal",
                decoration: [
                    {label: "精装", value: "strong"},
                    {label: "普通", value: "normal"},
                ],
                /*装修年限*/
                decorationYears: "nomal",
                years: [
                    {label: "5年", value: "strong"},
                    {label: "10年", value: "normal"},
                ],
                /*装修风格*/
                decorationStyle: "nomal",
                style: [
                    {label: "中国风", value: "strong"},
                    {label: "龙卷风", value: "normal"},
                ],

                /*产权*/
                propertyRight: "nomal",
                property: [
                    {label: "产权", value: "strong"},
                    {label: "产权2", value: "normal"},
                ],
                /*证件*/
                certificates: "nomal",
                certificatesM: [
                    {label: "身份证", value: "strong"},
                    {label: "结婚证", value: "normal"},
                ],
                /*付款*/
                payment: "nomal",
                paymentM: [
                    {label: "转账", value: "strong"},
                    {label: "现金", value: "normal"},
                ],

                /*家电*/
                electric: "nomal",
                electricM: [
                    {label: "空调", value: "strong"},
                    {label: "冰箱", value: "normal"},
                ],
                /*家具*/
                furniture: "nomal",
                furnitureM: [
                    {label: "沙发", value: "strong"},
                    {label: "床", value: "normal"},
                ],

                /*付佣*/
                payCommission: "nomal",
                pay: [
                    {label: "付佣", value: "strong"},
                    {label: "付佣2", value: "normal"},
                ],

                /*业主信息的房产证*/
                houseProperty: "nomal",
                house: [
                    {label: "房产证1", value: "strong"},
                    {label: "房产证2", value: "normal"},
                ],

                /*业主信息的国籍*/
                nationality: "nomal",
                nationalityM: [
                    {label: "中国", value: "strong"},
                    {label: "美国", value: "normal"},
                ],
                /*业主信息中的其他人信息的关系*/
                relationshipM: [
                    {label: "夫妻", value: "strong"},
                    {label: "父子", value: "normal"},
                ],
                imgName: '',
                visible: false,
                uploadListA: [],
                uploadListB: [],
                uploadListC: [],

            }
        },
        methods:{
            addPhone :function (index,state) {
                if (state === 0){
                    this.addObj.ownerInformation.otherPhone.push('')
                } else {
                    this.addObj.ownerInformation.otherContacts[index].otherPhone.push('')
                }
            },
            delPhone :function(index,nodeIndex,state) {
                if (state === 0){
                    this.addObj.ownerInformation.otherPhone.splice(index,1)
                } else {
                    this.addObj.ownerInformation.otherContacts[index].otherPhone.splice(nodeIndex,1)
                }
            },
            showSchoolMarker: function (index) {
                switch (index){
                    case 0:{
                        this.amap.search('学校')
                        break
                    }
                    case 1:{
                        this.amap.search('医院')
                        break
                    }
                    case 2:{
                        this.amap.search('超市')
                        break
                    }
                    case 3:{
                        this.amap.search('商场')
                        break
                    }
                    case 4:{
                        this.amap.search('公交车站')
                        break
                    }
                }
            },
            handleEditMarker: function () {
                this.amap.editMarker()
                if (this.amap.isEditMarker) {
                    this.editPoint = '保存坐标点'
                } else {
                    this.editPoint = '修改坐标点'
                }

            },
            handleEditMapRange: function () {
                this.amap.editPolygon()
                if (this.amap.isEditPolygon) {
                    this.editHouseText = '保存绘制范围'
                } else {
                    this.editHouseText = '绘制房源范围'
                }
            },

            handleTabs: function (name) {
                if (name === 'name2') {
                    this.uploadListA = this.$refs.uploadA.fileList;
                    this.uploadListB = this.$refs.uploadB.fileList;
                    this.uploadListC = this.$refs.uploadC.fileList;
                }
            },
            handleSaveHouse: function () {
                this.addObj.titlePosition.city = this.province[0]
                this.addObj.titlePosition.area = this.province[1]
                this.addObj.entrustInfo.entrustDate = w.resolutionTime(this.addObj.entrustInfo.entrustDate)
                this.addObj.entrustInfo.payDate = w.resolutionTime(this.addObj.entrustInfo.payDate)
                this.addObj.mapInfo.place = this.amap.markerSpot
                this.addObj.mapInfo.path = this.amap.newPath
            },
            close: function () {
                this.insideShow = false
            },
            handleHouseToPrivate: function () {
                // 锁定私盘
                this.isPublicHouse = !this.isPublicHouse
            },
            search:function(){
                $.get(function(data){
                    bus.$emit(data);//通过 bus 发布事件.
                });
            },
            /*房源图片*/
            handleViewA: function (name) {
                this.imgName = name;
                this.visible = true;
            },
            handleRemoveA: function (file) {
                // 从 upload 实例删除数据
                var fileList = this.$refs.uploadA.fileList;
                this.$refs.uploadA.fileList.splice(fileList.indexOf(file), 1);
                this.addObj.mediaInfo.imgList.splice(fileList.indexOf(file), 1)
            },
            handleSuccessA: function (res, file) {
                file.url = 'http://ovkxqgmua.bkt.clouddn.com/' + res.key;
                file.name = res.key;
                this.addObj.mediaInfo.imgList.push({
                    name: file.name,
                    url: file.url
                })
            },
            handleFormatErrorA: function (file) {
                this.$Notice.warning({
                    title: '文件格式不正确',
                    desc: '文件 ' + file.name + ' 格式不正确，请上传 jpg 或 png 格式的图片。'
                });
            },
            handleMaxSizeA: function (file) {
                this.$Notice.warning({
                    title: '超出文件大小限制',
                    desc: '文件 ' + file.name + ' 太大，不能超过 2M。'
                });
            },
            handleBeforeUploadA: function () {
                var check = this.uploadListA.length < 5;
                if (!check) {
                    this.$Notice.warning({
                        title: '最多只能上传 5 张图片。'
                    });
                }
                return check;
            },
            /* 360全景图片*/
            handleViewB: function (name) {
                this.imgName = name;
                this.visible = true;
            },
            handleRemoveB: function (file) {
                // 从 upload 实例删除数据
                var fileList = this.$refs.uploadB.fileList;
                this.$refs.uploadB.fileList.splice(fileList.indexOf(file), 1);
                this.addObj.mediaInfo.panorama.splice(fileList.indexOf(file), 1)
            },
            handleSuccessB: function (res, file) {
                // 因为上传过程为实例，这里模拟添加 url
                file.url = 'http://ovkxqgmua.bkt.clouddn.com/' + res.key;
                file.name = res.key;
                this.addObj.mediaInfo.panorama.push({
                    name: file.name,
                    url: file.url
                })
            },
            handleFormatErrorB: function (file) {
                this.$Notice.warning({
                    title: '文件格式不正确',
                    desc: '文件 ' + file.name + ' 格式不正确，请上传 jpg 或 png 格式的图片。'
                });
            },
            handleMaxSizeB: function (file) {
                this.$Notice.warning({
                    title: '超出文件大小限制',
                    desc: '文件 ' + file.name + ' 太大，不能超过 2M。'
                });
            },
            handleBeforeUploadB: function () {
                var check = this.uploadListB.length < 5;
                if (!check) {
                    this.$Notice.warning({
                        title: '最多只能上传 5 张图片。'
                    });
                }
                return check;
            },

            /* 45秒短视频合成*/
            handleViewC: function (name) {
                this.imgName = name;
                this.visible = true;
            },
            handleRemoveC: function (file) {
                // 从 upload 实例删除数据
                var fileList = this.$refs.uploadC.fileList;
                this.$refs.uploadC.fileList.splice(fileList.indexOf(file), 1);
                this.addObj.mediaInfo.videoInfo.splice(fileList.indexOf(file), 1)
            },
            handleSuccessC: function (res, file) {
                file.url = 'http://ovkxqgmua.bkt.clouddn.com/' + res.key;
                file.name = res.key;
                this.addObj.mediaInfo.videoInfo.push({
                    name: file.name,
                    url: file.url
                })
            },
            handleFormatErrorC: function (file) {
                this.$Notice.warning({
                    title: '文件格式不正确',
                    desc: '文件 ' + file.name + ' 格式不正确，请上传 jpg 或 png 格式的图片。'
                });
            },
            handleMaxSizeC: function (file) {
                this.$Notice.warning({
                    title: '超出文件大小限制',
                    desc: '文件 ' + file.name + ' 太大，不能超过 2M。'
                });
            },
            handleBeforeUploadC: function () {
                var check = this.uploadListC.length < 5;
                if (!check) {
                    this.$Notice.warning({
                        title: '最多只能上传 5 张图片。'
                    });
                }
                return check;
            },
            /*业主信息添加*/
            handleAdd:function (index) {
                this.addObj.ownerInformation.otherContacts.push({
                    name: '',
                    relationship: '',
                    phone: '',
                    landline: '',
                    WeChat: '',
                    QQ: '',
                    mainPhone:'',
                    otherPhone:[],
                });
            },
            handleRemove:function (index) {
                this.addObj.ownerInformation.otherContacts.splice(index, 1);
            },
            dropDown:function(){
                $(".name-input").bind("input propertychange",function(){
                    var thist = $(this)
                    thist.next().show().html("<em>"+thist.val()+"先生"+"</em>"+"<em>"+thist.val()+"女士"+"</em>");
                    $(".xuanz em").click(function(){
                        thist.val($(this).text());
                        $(".xuanz").hide();
                    })
                })
            },
            /*/!* 输入手机号后出现可点击添加按钮*!/*/
            InputEvents:function(){
                $(".cell-phone-number").bind("input propertychange",function(){
                    var thist = $(this);
                    thist.next().show();
                })
            },

        },
        created: function () {
            if (this.addObj.livingInDetails.length % 2 !== 0){
                this.addObj.livingInDetails.push({
                    key: '',
                    value: '',
                    show: true
                })
            }
            var that = this
            window.api.fetchQnToken()
                .done(function (res) {
                    that.requestData.token = res.token
                })
        },
        mounted:function () {
            this.amap = new editMap(this.amapDomId)
        }

    }
    w.addPrivateModal = addPrivateModal
}(window))
